import request from '@/plugin/axios'

// 获取列表
export function getfilemanagerlist(params) {
    return request({
        url: '/fs/filemanager/list',
        method: 'get',
        params: request.adornParams(params)
    })
}
// 获取文件目录
export function getfilemanagercatalog(params) {
    return request({
        url: '/fs/filemanager/catalog',
        method: 'get',
        params: request.adornParams(params)
    })
}

// 创建文件夹
export function createFolder(data) {
    return request({
        url: '/fs/filemanager/createFolder',
        method: 'post',
        data
    })
}
// 获取信息
export function getfilemanagerinfo(id) {
    return request({
        url: '/fs/filemanager/info/' + id,
        method: 'get',
        params: request.adornParams({})
    })
}

// 添加
export function addfilemanager(data) {
    return request({
        url: '/fs/filemanager/save',
        method: 'post',
        data
    })
}

// 修改
export function updatefilemanager(data) {
    return request({
        url: '/fs/filemanager/update',
        method: 'put',
        data
    })
}

// 批量删除
export function delBatchfilemanager(params) {
    return request({
        url: '/fs/filemanager/delete',
        method: 'post',
        data: request.adornData(params, false)
    })
}

// 删除
export function delfilemanager(id) {
    return request({
        url: '/fs/filemanager/delete/' + id,
        method: 'delete',
    })
}